The invention relates to a method for selective detection and readout of at least one character string, wherein the at least one character string is input into a data processing unit and is incorporated into a primary output signal stream output at an output interface of the data processing unit, wherein the number of characters of each character string in each case does not exceed a predetermined maximum number and wherein position control signals are allocated to each character string and are inserted into a predetermined portion of the primary output signal stream, wherein the position control signals can cause a primary output device which is capable of being connected to the output interface to output the character string allocated thereto in each case at a predetermined output position of an output medium.
Data processing units of the most varied construction and size are used on a large scale for the most varied tasks, for example for controlling and monitoring equipment, installations and automated processes, for office and communication tasks, in research and development as well as in the entertainment sector. For output of the processed data a large number of the most varied data processing units are connected to the most varied data output devices. The data processing units include for example mainframe computers, PCs, mini- and microcomputers, but also control and regulating devices. Output devices can be display devices, such as cathode ray tubes or LCD displays, or also printers or plotters. The output devices are connected at an interface to the data processing unit. The interface can be a standard interface, for example a parallel Centronics interface of a serial RS-232 interface. The output interface of the data processing unit must be adapted to the input interface of the output device. With regard to the hardware this means first of all that the signals emitted by the data processing unit at the output interface must be adapted as regards their voltage and current level and as regards the time defaults to the requirements of the output device. Furthermore, the serial or parallel output signal sequences should also be adapted in their logical significance, for example as regards the coding used, the control signals used and the protocol used, to the requirements of the output device.
A vast number of data processing units can receive, process and output character strings. A character string should be understood as a sequence of coded characters. A character may for example be a text character (letter, number, special character) or a pseudo-graphics character. Characters are usually coded with the aid of a predetermined number of bits, wherein the number of bits determines the number of different characters which can be coded by the code. There are a series of standard codes for coding the most common characters, for example ASCII code or ANSI code.
The majority of available output devices can receive signal streams containing character strings of a standard code from serial or parallel interfaces and process them for output. In addition, the majority of output devices require signals which control the positioning of the output characters on an output medium. In the case of a printer these are for example characters which indicate the start of a new page, a new line or a specific position in the line, as well as the font used, the size of the character or color. Displays require signals which for example display the position of the characters to be output on the screen or clearing of the screen. The various known output devices (printers, displays) use a large number of the most varied control signals and control signal sequences.
In an existing data processing unit it is frequently necessary to change the connected output device for a new one or to add a further output device. Then the problem often occurs that the control signals output from the output interface by the data processing unit under the control of the programs run on the data processing unit can no longer be completely and correctly interpreted by the new or additional output device. Even when a standard hardware interface is used with the same signal levels and time signal sequences, as a rule only a proportion of the transmitted characters are correctly interpreted by the output device. In particular the control signals used for formatting and positioning of the output characters can often no longer be correctly interpreted by the new or additional output device.
Similar problems occur when parallel to or as a replacement for an existing output device another output device intended to further process and output only a proportion of the output character strings is to be connected to the data processing device. A typical example of this is the connection of a printer for printing address labels parallel to a printer printing standard letters. The address label printer should filter out from the output signal stream output by the data processing unit to the letter printer only the address components located in the letterhead and should print these on an address label. It should ignore the rest of the data.
The object of the invention therefore is to be able to selectively detect and read out character strings in an output signal stream from a data processing unit without a subsequent intervention into the existing software of the data processing unit being necessary and without the need for the user to have knowledge of the software which generates the output signal stream.
This object is achieved according to the invention by a method with the features of claim 1. The character strings to be selectively detected and read out are the character strings input into a data processing unit in normal operation which are incorporated into a primary signal stream output at an output interface of the data processing unit. The number of characters of each character string does not exceed a predetermined maximum number. The input of the character strings and the incorporation into the primary output signal stream is usually controlled by the programs running on the data processing unit. A character string is understood to be not only the input sequence of an operator which is for example made visible on an input mask of a screen of the data processing unit but also the sequential output signal sequence to the output interface which is generated therefrom. The character string does not have to be input into the data processing unit by an operator; it can also reach an input area by output of a program running on the data processing device or another device. A data processing device should be understood to be any device or part of a device to which a character string can be input in coded form and which outputs this character string, possibly changing the coding, at an output interface. The maximum number of characters of each character string is predetermined by the software running on the data processing unit and is indicated for example by the width of an input field visible in an input mask of a screen. Position control signals are allocated to each character string and inserted into a predetermined portion of the primary output signal stream, wherein the position control signals can cause a primary output device which is capable of being connected to the output interface to output the character string associated therewith in each case at a predetermined output position of an output medium. The predetermined portion of the primary output signal stream is for example that portion which describes a page of a screen or a printer and is initiated or terminated by a corresponding control signal. The output medium is for example a printed page or a label or a page of the screen. The position control signals are those control signals which can influence the output position of a character string on the output medium. In addition further control signals can be incorporated into the output signal stream which for example control the way the characters are represented.
The method according to the invention is characterized in that a conversion device connected to the output interface of the data processing unit is put into a configuration mode, wherein in the configuration mode a marking character string is input into the data processing unit instead of each character string which is to be selectively detected. Each marking character string forms a unique sequence of characters which does not occur in the primary output signal stream output during the normal operation. The number of characters of the marking character string is equal to the maximum number of characters of the appertaining character string. In this case it is advantageous that for input of the marking character string the program usually running on the data processing unit can be used. The marking character string is input like a normal character string at the location provided by the program sequence (for example in the displayed input mask ). Then each marking character string (controlled by the existing program) proceeds with allocated position control signals into the primary output signal stream of the data processing device. The primary output signal stream is received by the conversion device and searched for marking character strings, and when a marking signal string is detected position data identifying its point of origin in the primary output signal stream is obtained from the position control signals allocated to the particular marking character string and inserted in the predetermined portion of the primary output signal stream, and this position data is stored together with the number of characters of the marking character string in the conversion device. Since the length of the marking character string is equal to the maximum length of the character string which it replaces in the configuration mode, by storage of the length and of position data identifying the point of origin of the marking character string data about the end of the marking character string is also simultaneously stored.
After this the conversion device is put into an operating mode in which the primary output signal stream is received, current position data is obtained from the received position control signals, the current position data is compared with each of the stored items of position data and when the current position data corresponds to stored position data the appertaining character string is read out from the primary output signal stream. The position data xe2x80x9clearnedxe2x80x9d in the configuration mode is used for the respective character string in the operating mode in order to detect and read out any character string at the location thus marked of the primary output signal stream. The conversion device xe2x80x9cconvertsxe2x80x9d the received output signal stream into a xe2x80x9cstreamxe2x80x9d of selectively read out character strings. The character strings which are read out can then be output by the conversion device or can be further processed in the conversion device. With the aid of the method according to the invention it is possible to read out from an output signal stream any character string which always occurs allocated to the same position data, without having a knowledge of the software generating the output signal stream. No knowledge about the control signals used is necessary. In the case of repeated output of different character strings allocated to the same position data (for example when sending out standard letters with changing addresses in the address field of the letters) the conversion device selectively reads out the appertaining character strings each time.
In a further development of the method according to the invention, a page of a two-dimensional output medium is defined by the predetermined portion of the primary output signal stream. The term xe2x80x9cpagexe2x80x9d in the widest sense should include all paper page formats of a printer as well as pages of the size of a label or screen pages, also in the extreme case even a single output line. Moreover lines and columns of the page are defined by the position control signals preceding the character string to be detected in the predetermined portion, wherein the output position of a character of the character string is fixed unambiguously by a column number and a line number. In configuration mode a column number and a line number is stored as position data for each marking character string. This embodiment of the method according to the invention is suitable for all output devices which output characters exclusively in fixed predetermined lines and within the lines at fixed predetermined positions (columns), for example alphanumeric terminals as well as a large number of conventional printers. The line and column numbers stored as position data preferably correspond to the output positions of the first character in each case of the marking character strings. Thus they also correspond to the output position of the first character in each case of the appertaining character strings in the operating mode. In the operating mode a current line number and a current column number are obtained in each case as position data from the received position control signals and character strings. When the current line/column numbers correspond to the stored line/column numbers the subsequent characters are read out from the output signal stream until either the maximum number of characters of the character string is reached or a character string end signal is detected. The character string end signal can for example be a control signal for line shifting or a tabulator control signal. The position data obtained from the line number and the column number can be a concatenation of both numbers or a binary number calculated from both numbers. The line and column number are preferably stored as position data in separate counters. When the position control signals comprise those signals which indicate the start of a new page or of a new line, then in the preferred embodiment a line counter or a column counter is correspondingly reset as soon as a position control signal indicating the start of a new page or respectively of a new line is detected.
In the configuration mode the position control signals and character strings belonging to a page of the output medium are in each case advantageously buffered in the conversion device. Then the buffered character strings are searched for marking character strings. When a marking character string is found the line number to be stored as position data and the column number to be stored are obtained from the preceding position control signals and character strings of the page. Preferably the position control signals and character strings preceding the marking character strings are first of all searched until a signal indicating the start or the end of a line has been found. In this case a column counter is incremented when each of the characters preceding the marking character string is exceeded. Then the position control signals preceding the marking character string are searched until a character indicating the start of the page is found. In this case a line counter is incremented when each character effecting a line shift is exceeded. The resulting counter readings are stored as position data.
In a further development of the invention the conversion device has two page stores. The portions of the primary output signal stream which form a following page of the output medium are buffered in a page store. At the same time in the configuration mode the portions of the primary output signal stream which form the preceding page of the output medium and are buffered in the other page store of the conversion device are searched for marking character strings and the position data is obtained from the buffered portions.
In an alternative embodiment of the method according to the invention, for each character string an unambiguously allocated part-sequence of position control signals is inserted into the predetermined portion of the primary output signal stream, and with the aid of the part-sequence of position control signals the output device is enabled to determine the output position of the character string. In the configuration mode the predetermined portion of the primary output signal stream is buffered and the part-sequence allocated to a marking character string in the predetermined portion is used in order to obtain the appertaining position data. In the operating mode the part-sequence allocated to a character string is used in order to obtain the current position data. This embodiment of the method according to the invention is used on those output devices which receive from the data processing unit a signal stream from which no line and column data can be obtained by xe2x80x9ccounting inxe2x80x9d. These output devices, for example some heat transfer printers for labels, receive control sequences in which a position of a character string is coded in a special command. Such printers for example receive a signal stream in the form of a sequence of program commands in a special printer programming language. The program commands contain control commands which fix the position of a specific output, commands which represent the content of the output, for example the content of a character string, and commands which finally fix the start of printout and the number of copies. In such a case the software of the output device first of all generates from the program sequence transmitted to it the locations, formats and contents of the character strings to be output. In this embodiment of the method according to the invention, in the configuration mode after detection of a marking character string (e.g. in a command) the buffered predetermined portion of the primary output signal stream is searched for the allocated position-identifying part-sequence, in which case it is possible to use either data about a relative position of the part-sequence in relation to the marking character string or knowledge about the occurrence of predetermined control signals within the part-sequence. This knowledge about the relative position or specific fixed contents of the position-identifying part-sequence are preferably obtained (xe2x80x9clearnedxe2x80x9d) in the configuration mode in that on the one hand a plurality of different marking character strings are incorporated into a predetermined portion of the primary output signal stream and on the other hand the same marking character strings are incorporated at different locations in successive predetermined portions of the primary output signal stream.
In a preferred embodiment the part-sequence immediately precedes the character string or immediately runs on from it. Then a portion of the part-sequence itself can be stored as position data. This portion contains for example an identification character string which is unambiguously allocated to the position of the particular marking character string in the configuration mode or to the character string to be read out in the operating mode. The identification character string is for example a serial number associated with the character string. In addition the portion of the part-sequence stored as position data can include an output command which causes the output device when decoding the printer command to output the character string designated in the printer command by the identification number. Since the printer command allocated to this identification number occurs only once in the portion of the primary output signal stream allocated to each page of the output medium, it is suitable as position data.
In a preferred embodiment the part-sequence immediately precedes the character string, wherein in the operating mode the received position control signals are continuously compared with each stored part-sequence and when it is detected that they correspond the characters immediately following the part-sequence are read out of the buffered portions of the primary output signal stream until the maximum number of characters of the character string which are allocated to the part-sequence is reached or a character string end signal is detected.
The marking character string is preferably at least four characters long and contains at least one character which represents the respective maximum number of characters in the marking character string. The remaining characters of the marking character string are preferably identical but different from the characters of any other marking character string. In a preferred embodiment the second and the third character of the marking character string represent the maximum number of characters and the remaining characters represent any letters. A marking character string for marking a character string with 10 characters reads for example: xe2x80x9cA10AAAAAAAxe2x80x9d. In almost all cases which might come into consideration of the use of programs running on the existing data processing unit it is possible to input such a marking character string. In normal operation such a character string occurs with very low probability. Moreover, the marking character string contains redundant information about its length. If in particular in the case of short marking character strings which are four, five or six characters long the case should occur that apart from such a marking character string an identical character string should occur in the xe2x80x9cnormalxe2x80x9d remaining output signal stream, then the operator merely needs to change the letters used, for example to input the rare letters xe2x80x9cYxe2x80x9d in order to create a detectable unique marking character string.
In a preferred further development of the method according to the invention not only is the character string selectively read out of the primary output signal stream but after readout by the conversion device a secondary output signal stream depending upon the at least one character string which has been read out is output to a secondary output device connected to an output interface. In this method basically a received primary output signal stream is converted into a secondary output signal stream. Specific data contained in the primary output signal stream is detected and processed and a secondary output signal stream dependent upon this data is generated. For example depending upon the content of a character string which has been read out the conversion device can retrieve data previously stored in the conversion device and incorporate it into the secondary output signal stream. This can take place for example with the aid of a lookup table in which the character strings which might possibly be read out are in each case associated with the data to be output in the secondary output signal stream.
In a preferred further development of the method according to the invention the secondary output signal stream contains signals which cause the secondary output device to output a character sequence which is dependent upon the character string read out. With this method it is possible for example for the character strings output by the data processing unit to be output on a printer which can receive exclusively graphics pixel data. The conversion device for example selectively reads out the character string to be output and allocates corresponding pixel data to each character read out. Then the pixel data are positioned at corresponding memory locations in an output memory so that they form a graphics character string. Then the output memory can be read out pixel by pixel to the graphics printer.
In another embodiment the secondary output signal stream can also contain the character string which has been read out in a character code. Also mixed forms of the two methods are conceivable in which the secondary output signal stream contains the character strings which have been read out both as a character code sequence and as graphics pixel data.
In a further development of the method according to the invention, in the configuration mode apart from the number of characters in the marking character string (=maximum number of characters in a character string) an item of output data is allocated and stored for each stored item of position data. The output data defines the content and the location of the output of the character sequence dependent upon the character string which has been read out. Thus it is possible to allocate individual items of data about the character sequence of the secondary output signal stream to each character string which has been read out. With regard to the content of the character sequence the output data defines for example whether the character sequence is identical with the character sequence which has been read out or which portions of the character sequence which has been read out should be converted into the secondary output signal stream. With regard to the location of the output of the character sequence, lines and columns for example or other two-dimensional co-ordinate details of an output medium are defined.
The secondary output signal stream is preferably formed from output data stored in an output memory of the conversion device. The character strings which have previously been read out of the primary output signal stream are written into predetermined output memory locations of the output memory as part of the output data (before the formation of the secondary output signal stream). In the configuration mode at least one predetermined output memory location is allocated to each stored item of position data as output data. In the configuration mode the output memory location is preferably allocated in such a way that a pattern character string is stored at the at least one predetermined output memory location, wherein the pattern character string stands in a predetermined relation to the marking character string allocated to the stored position data. Then in each case after the detection of a marking character string the output memory is searched for pattern character strings, and when a pattern character string is found the output storage location thereof is stored in association with the position data. The pattern character string and the allocated marking character string preferably constitute identical character sequences. However, in alternative embodiments it is conceivable for example that the pattern character string constitutes lower case letters of an alphabet whilst the allocated marking character string constitutes the identical upper case letters.
The output information about the output location is obtained with the aid of the pattern character string in the configuration mode in a similar manner to obtaining an item of position data allocated to a marking character string. In both cases a character string is used which does not occur or only has only a very low probability of occurring in the rest of the primary output signal stream or in the rest of the secondary output signal stream. With the aid of a searching process a search is carried out for the marking or pattern character string in a memory which stores portions of the respective output streams. The items of data which unambiguously identify the location of the particular character string in the particular output signal stream are then stored and allocated to one another.
In a preferred further development of the method according to the invention, in the configuration mode an input mask associated with the output medium of the secondary output device is displayed on a display device for storage of the pattern character string in the output memory. A pattern character string is input by a user at an input location of the input mask. Then the pattern character string is transmitted to an output storage location allocated to the input location. This is preferably achieved by connection of the conversion device in the configuration mode to a further data processing unit. The pattern character string is input into an input mask displayed on the display device of the further data processing unit under the control of a program running on the further data processing unit. The pattern character string is then transmitted together with other output data from the further data processing unit into the output memory of the conversion device. In this embodiment of the method according to the invention two learning processes are carried out one after the other or in parallel in the configuration mode, by which the conversion device learns, on the one hand, at which location in a primary output signal stream a character string which is to be detected and read out is to be found and, on the other hand, at which location in a secondary output signal stream the character string which has been read out is to be incorporated. In one learning stage of the configuration process, with the aid of a marking character string the conversion device obtains data about the location of the output character string which is to be read out. The marking character string is input in a known manner under the control of software present on one data processing unit. It is incorporated into the primary output signal stream in a manner corresponding to a primary output device. In the other learning process of the configuration mode a pattern character string is input in a similar manner under the control of a program running on a further data processing unit in a manner predetermined by this program, for example into an input mask. The pattern character string is also incorporated into an output signal stream and transmitted by the further data processing unit into the output memory of the conversion device. The control signals associated with the output signal stream of the further data processing unit are adapted to the requirements of a secondary output device. In both learning processes the conversion device recognizes on the one hand the marking character string and on the other hand the pattern string, detects the respective position data, produces a concatenation or association between the two items of position data and stores this concatenation. With this the configuration of the conversion device is ended, and the further data processing unit can be separated from the conversion device. Finally, in the operating mode the primary output signal stream is transformed by the conversion device into a secondary signal stream. In this case the desired character string is inherited from the primary by the secondary output signal stream, the control signals of the primary output signal stream which are adapted to a primary output device being replaced by control signals of the secondary output signal stream which are adapted to a secondary output device. At the same time any repositioning and also multiple incorporation of the inherited character strings is possible. The xe2x80x9clearningxe2x80x9d of the conversion device in the configuration mode can be undertaken without any knowledge of the control signals necessary for operation of the primary or secondary output device and detailed knowledge of the programs running on the data processing unit and the further data processing unit. The user merely needs to input predetermined, preferably identical, marking or pattern character strings at the locations indicated to him of the programs running on the respective data processing units and to put the conversion device into the configuration mode. The conversion device then allocates the marking character string to the pattern character string automatically and stores the necessary position and output data.
Advantageous further developments are characterized in the subordinate claims.